package com.wy17113.model.dao.impl;

import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

public class Test {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		int num = 1000000;
		List<String> res = new ArrayList<String>();
		String[] arr = new String[num];
		
		SimpleDateFormat smt = new SimpleDateFormat("yyyy-MM-dd hh:MM:ss:SSS");
		
		for(Integer i=0; i<num; i++){
			res.add(i.toString());
			arr[i] = i.toString();
		}
		
		int m = 0;
		int n = 0;
		
		System.out.println(res.size());
		System.out.println(arr.length);
		
		System.out.println("第一个循环开始时间：" + smt.format(new Date()));
		for (int i = 0, h = res.size(); i < h; i++){
			m ++;
		}
		System.out.println("第一个循环结束时间：" + smt.format(new Date()));
		
		
		System.out.println("第二个循环开始时间：" + smt.format(new Date()));
		for (int i = 0; i < res.size(); i++){
			n ++;
		}
		System.out.println("第二个循环结束时间：" + smt.format(new Date()));
		System.out.println(m);
		System.out.println(n);
		
		
	}

}
